﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>手机用户管理 - 业务访问日志列表</title>
<style type="text/css" media="all">
    @import url(../css/wimpCommon.css);
	@import url(../css/chChannel.css);
	@import url(../css/chRight.css);
</style>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/jquery.blockUI.js"></script>
<script type="text/javascript" src="../js/GridPanel.js"></script>
<script type="text/javascript">
//手机用户信息列表部分JS
//获取列表数据
var grid = new GridPanel({
	store: new Store({ url: '../service/1.3.6.4.2', maskPanel:'#row3', mask:'数据加载中...'}),
	renderTo: 'row3',
	Columns: [ 
	{ header: '编号', dataIndex: 'ID', sortable: false, allowHide: false, isShow: true, className: 'th01' },
	{ header: '用户ID', dataIndex: 'SOFTWARE_ID', sortable: false, allowHide: false, isShow: true, className: 'th01' },
	{ header: '业务编号', dataIndex: 'SERVICE_ID', sortable: false, allowHide: false, isShow: true, className: 'th01' },
	{ header: '易致协议', dataIndex: 'Protocol', sortable: false, allowHide: true, isShow: true, className: 'th01'},
	{ header: '连接端点', dataIndex: 'RemoteEndPoint', sortable: false, allowHide: true, isShow: false, className: 'th01' },
	{ header: '访问时间', dataIndex: 'VISIT_TIME', sortable: false, allowHide: false, isShow: true, className: 'th01' },
	{ header: '接收字节', dataIndex: 'ReceiveByteLength', sortable: false, allowHide: true, isShow: true, className: 'th01' },
	{ header: '发送字节', dataIndex: 'SendByteLength', sortable: false, allowHide: true, isShow: true, className: 'th01'},
	{ header: '状态码', dataIndex: 'StatusCode', sortable: false, allowHide: false, isShow: true, className: 'th01'},
	{ header: '业务处理', dataIndex: 'HTML_TIME', sortable: false, allowHide: true, isShow: false, className: 'th01'},
	{ header: '耗时(ms)', dataIndex: 'PARSE_TIME', sortable: false, allowHide: false, isShow: true, className: 'th01', render:'{PARSE_TIME}'},
	{ header: '备注', dataIndex: 'Message', sortable: false, allowHide: true, isShow: true, className: 'th01', render:function(f,o,i){
		if (f && f != 'OK')
		{
		    return '<span style="background:yellow;color:red">' + f.replace("<", "&lt;").replace(">", "&gt;") + '</span>';
		}
		return f;
	}},
	{ header: '缓存描述', dataIndex: 'CacheRate', sortable: false, allowHide: true, isShow: false, className: 'th01'},
	{ header: '原始地址', dataIndex: 'KEY_URL', sortable: false, allowHide: true, isShow: true, className: 'th01' },
	{ header: '实际地址', dataIndex: 'REAL_URL', sortable: false, allowHide: true, isShow: false, className: 'th01', render: function(f, o, i) {
	    if (f)
	        return f.replace(/[0-9A-F]{8}\s/gi, "<br/>$&");
	    return f;
	} 
	}
	],
	cellSelection: true,
	rowSelection: false
});


//页面参数配置
//SearchField,SearchCondition,SearchValue说明
//SearchField为字符串数组，为搜索的字段名
//SearchCondition为数字数组，为搜索的条件：0:"=",1:"<=",2:">=",3:"<",4:">",5:"<>",6:"like",7:"charindex"
//SearchValue为OBJECT数组，为搜索的值得
//三个数组的元素必须一直互相对应。
var pageConfig = {SearchField:["ID"],SearchCondition:[4],SearchValue:[0]};


//页面加载执行
$(function()
{
	//初始化页面信息
	Init_PageDataListConfig();

	//初始化页面按钮事件
	Init_PageButton();

});


//初始化请求条件
function Init_PageDataListConfig()
{
	//添加查询到列表请求中
	grid.store.params.SearchField = pageConfig.SearchField;
	grid.store.params.SearchCondition = pageConfig.SearchCondition;
	grid.store.params.SearchValue = pageConfig.SearchValue;
	
	grid.autoLoad = false;
	grid.onSuccess = function(data){
		if (!this.rendered)
		{
			this.DrawTableHead();
			this.FitHeight();
		}
		this.DrawTable(data);
		this.onDataChanged(data);
	}
	grid.store.params.pageIndex = 1;
	grid.store.load();
}


//初始化页面按钮事件
function Init_PageButton()
{
	//刷新按钮
	$("#btnRefreshPage1").click(function()
	{
	    grid.RefreshPage();
	});

    //搜索按钮
    $("#btn_Search").click(function() {
        top.fn_add_div('./MobileUser/MobileUserLogSearch.html', '', '', '610px', '155px', '日志搜索');
    });
}
</script>
</head>
<body>
<div class="rightBox">
	<div class="rTitle1" id="row1"><h2 class="rightT1">手机用户管理 >>> 业务访问日志列表</h2></div>
	<div class="rTitle2" id="row2">
	    <span class="sps" id="btnRefreshPage1" title="刷新"></span>
	    <div class="rTliner"></div>
	    <div class="rTBotr"><a href="javascript:void(0);" id="btn_Search" style="cursor:pointer;" title="数据搜索">搜索</a></div>
	</div>
	<div class="rightText" id="row3"></div>
</div>
</body>
</html>
